home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ucturbo2 / demoibm.c < prev    next >
Text File  |  1987-05-23  |  19KB  |  843 lines

  1. /*                      Demo4.c
  2. *
  3. *    This program is designed to illustate some of the features contained
  4. *  in the UC4 library.  It uses the 4 color medium resolution mode of the
  5. *  IBM PC and compatibles.  A second version of the library is available
  6. *  to be used with the 16 color medium resolution mode (mode 9) on the
  7. *  Tandy 1000 computer.
  8. */
  9.  
  10. #include <uc.h>
  11.  
  12. int i;
  13.  
  14. main()
  15. {
  16.  
  17.    int start = 9;
  18.  
  19.    sm(4);
  20.    backclr(1);
  21.  
  22.    gothic('U',10,start+0,3);
  23.    gothic('n',10,start+25,3);
  24.    gothic('i',10,start+45,3);
  25.    gothic('c',10,start+60,3);
  26.    gothic('o',10,start+80,3);
  27.    gothic('r',10,start+100,3);
  28.    gothic('n',10,start+120,3);
  29.  
  30.    gothic('S',10,start+150,3);
  31.    gothic('o',10,start+170,3);
  32.    gothic('f',10,start+190,3);
  33.    gothic('t',10,start+205,3);
  34.    gothic('w',10,start+220,3);
  35.    gothic('a',10,start+240,3);
  36.    gothic('r',10,start+260,3);
  37.    gothic('e',10,start+280,3);
  38.  
  39.    raschar('P', 50, start + 70, 2, 2, 3);
  40.    raschar('r', 50, start + 90, 2, 2, 3);
  41.    raschar('e', 50, start + 110, 2, 2, 3);
  42.    raschar('s', 50, start + 130, 2, 2, 3);
  43.    raschar('e', 50, start + 150, 2, 2, 3);
  44.    raschar('n', 50, start + 170, 2, 2, 3);
  45.    raschar('t', 50, start + 190, 2, 2, 3);
  46.    raschar('s', 50, start + 210, 2, 2, 3);
  47.    victory();
  48.    unicorn();
  49.    greenslv();
  50.    atsay(24, 3, 2, 0,"Copyright (c) 1986 David A. Miller");
  51.    cntue();
  52.    waitkey();
  53.    sm(4);       /* this resets the mode which in effect is a
  54.                    clear screen command.                      */
  55.    backclr(9);
  56.  
  57.    printf("\n\n\n  A demonstration of IBM PC graphics\n");
  58.    printf(" using the 4 color med. resolution mode\n");
  59.    printf(" and the unicorn library of functions.\n");
  60.    printf(" This library is designed to work with \n");
  61.    printf(" the Microsoft C small model. It has\n");
  62.    printf(" been written using Microsoft C 4.0 \n");
  63.    printf(" and the Microsoft Assembler 4.0.\n");
  64.    printf("    Not all library functions are\n");
  65.    printf(" illustrated in this demo.  The\n");
  66.    printf(" library is capable of many graphics\n");
  67.    printf(" concepts including points, lines,\n");
  68.    printf(" circles, ellipses (these may be \n");
  69.    printf(" rotated from the vertical or\n");
  70.    printf(" horizontal and colorful print\n");
  71.    printf(" including different fonts.  We\n");
  72.    printf(" hope you enjoy the Unicorn library!\n\n");
  73.    printf(" Version 4.0 pre-release for Microsoft\n");
  74.    printf(" C small model.\n");
  75.    printf("  Copyright (C) 1986 David A. Miller\n");
  76.    atsay(23,8,2,0,"Press any key to continue");
  77.    waitkey();
  78.    sm(4);       /* this resets the mode which in effect is a
  79.                    clear screen command.                      */
  80.    backclr(14);
  81.  
  82.  
  83.  
  84.    pg1();
  85.    waitkey();
  86.    sm(4);
  87.    backclr(1);
  88.  
  89.  
  90.  
  91.    pg2();
  92.    cntue();
  93.    waitkey();
  94.    sm(4);
  95.    backclr(1);
  96.  
  97.    pg3();
  98.    cntue();
  99.    waitkey();
  100.    sm(4);
  101.    backclr(9);
  102.  
  103.    atom();
  104.    cntue();
  105.    waitkey();
  106.    sm(4);
  107.    backclr(1);
  108.  
  109.    printf("   The next screen will demonstrate\n\n");
  110.    printf("    T U R T L E  F U N C T I O N S");
  111.  
  112.    burble(200, 300);
  113.  
  114.    printf("\n\n\n\n\n   The delay function is used to");
  115.    printf("\n   slow down the display of lines\n");
  116.    cntue();
  117.    waitkey();
  118.    palette(0,5,8);
  119.  
  120.    pg5();
  121.    cntue();
  122.    waitkey();
  123.    sm(4);
  124.    backclr(1);
  125.  
  126.    script('P', 5, 100, 3);
  127.    script('a', 5, 116, 3);
  128.    script('l', 5, 132, 3);
  129.    script('e', 5, 148, 3);
  130.    script('t', 5, 164, 3);
  131.    script('t', 5, 180, 3);
  132.    script('e', 5, 196, 3);
  133.  
  134.    redalert();
  135.  
  136.    printf("\n\n\n\nThe following page illustrates\n");
  137.    printf("the palette command.  This command\n");
  138.    printf("allows the programmer to control the\n");
  139.    printf("color set and background color with\n");
  140.    printf("one command.  There are a total of 6\n");
  141.    printf("sets of three colors that may be \n");
  142.    printf("displayed.  Three of these are normal;\n");
  143.    printf("while the other three are bright\n");
  144.    printf("versions of the basic three.\n");
  145.    printf("\n\n     Press any key to continue\n");
  146.    waitkey();
  147.  
  148.    pg6();
  149.    cntue();
  150.    waitkey();
  151.    sm(4);
  152.    backclr(9);
  153.  
  154.  
  155.    pg7();
  156.    cntue();
  157.    waitkey();
  158.    sm(4);
  159.    backclr(9);
  160.  
  161.  
  162.    pg8();
  163.    atsay(24,7,3,0, "Press any key to continue");
  164.    waitkey();
  165.    sm(4);
  166.    backclr(9);
  167.  
  168.    pgf();
  169.    greenslv();
  170.    waitkey();
  171.    sm(3);
  172.    backclr(1);
  173.  
  174. }  /*  End of main program */
  175.  
  176.  
  177.  
  178. pg1()
  179. {
  180.    burble(200,300);
  181.  
  182.    atsay(10,5,2,0, "The next page will demonstrate");
  183.    atsay(11,5,2,0, "some of the simple graphics");
  184.    atsay(12,5,2,0, "primitives including dots,");
  185.    atsay(13,5,2,0, "lines, filled boxes and");
  186.    atsay(14,5,2,0, "rectangles. ");
  187.    atsay(20,5,3,0, "Press any key to continue");
  188. }
  189.  
  190. pg2()
  191. {
  192.    int i;
  193.  
  194.    for(i=0; i <= 20; i++)
  195.       point(20, 10+i*2, i % 4);
  196.    box(50,20,80,50,1);
  197.    boxfill(54,24,76,46,2);
  198.    box1(50,80,80,110,2,1);
  199.    box2(50,140,80,170,3,1);
  200.    circle(65,240,50,1,1,3);
  201.    paint(65,240,2,3);
  202.    line(120,20,190,300,1);
  203.    line(190,20,120,300,2);
  204.    line(155,20,155,300,3);
  205. }
  206.  
  207. pg3()
  208. {
  209.    atsay(7,5,3,0, "The following screen will further");
  210.    atsay(8,5,3,0, "demonstrate the circle function");
  211.    atsay(9,5,3,0, "and introduce the rotated ellipse");
  212.    atsay(10,5,3,0, "function.  The latter allows the");
  213.    atsay(11,5,3,0, "user to draw an ellipse with a");
  214.    atsay(12,5,3,0, "specified aspect and angle of");
  215.    atsay(13,5,3,0, "rotation.");
  216. }
  217.  
  218. pg5()
  219. {
  220.  
  221.    turnright(150);     /*  Double Triangle  */
  222.  
  223.    pencolor(1);
  224.  
  225.    forward(50);
  226.  
  227.    delay(500);
  228.    turnright(120);
  229.    forward(50);
  230.    delay(500);
  231.    turnright(120);
  232.    forward(100);
  233.    delay(500);
  234.    turnleft(120);
  235.    forward(50);
  236.    delay(500);
  237.    turnleft(120);
  238.    forward(50);
  239.  
  240.    turnright(180);
  241.    forward(50);
  242.  
  243.    pencolor(0);
  244.  
  245.    forward(50);
  246.    turnright(120);
  247.    pencolor(2);
  248.    delay(500);
  249.    forward(100);
  250.    turnright(60);
  251.    delay(500);
  252.    forward(100);
  253.    turnright(60);
  254.    delay(500);
  255.    forward(100);
  256.    turnright(60);
  257.    delay(500);
  258.    forward(100);
  259.    turnright(60);
  260.    delay(500);
  261.    forward(100);
  262.    turnright(60);
  263.    delay(500);
  264.    forward(97);
  265.  
  266.    turnright(72);
  267.    forward(5);
  268.    pencolor(0);
  269.    forward(48);
  270.    turnright(96);
  271.  
  272.    turnleft(72);
  273.    pencolor(3);
  274.    forward(90);
  275.    turnright(72);
  276.    forward(90);
  277.    turnright(72);
  278.    forward(90);
  279.    turnright(72);
  280.    forward(90);
  281.    turnright(73);
  282.    forward(90);
  283.    pencolor(0);
  284.  
  285.    paint(90,160,3,1);
  286.    paint(110,160,3,1);
  287.  
  288.    burble(100,200);
  289.  
  290.    paint(40,160,2,3);
  291.    paint(182,160,1,2);
  292.  
  293.  }
  294.  
  295.  
  296.  
  297.  
  298. pg6()
  299. {
  300.    palette(2,4,0);
  301.    house();
  302.  
  303.    palette(0,5,0);
  304.    house();
  305.  
  306.    palette(0,4,0);
  307.    palette(0,4,0);
  308.    house();
  309.  
  310. }
  311.  
  312. house()
  313. {
  314.    for(i=0;i<=120;i++)
  315.       point(rand() / 165,rand() / 103, rand() / 8192);
  316.  
  317.    line(180,0,180,319,1);        /* grass line */
  318.    paint(183,10,1,1);            /*   grass */
  319.    line(150,50,120,110,1);
  320.    line(120,110,152,160,1);
  321.  
  322.    line(140,70,180,70,1);
  323.    line(140,140,180,140,1);
  324.    line(180,70,180,140,1);
  325.  
  326.    line(160,80,180,80,1);
  327.    line(160,95,180,95,1);
  328.    line(160,80,160,95,1);
  329.  
  330.  
  331.    line(150,110,170,110,1);       /* Window */
  332.    line(150,120,170,120,1);
  333.    line(150,130,170,130,1);
  334.    line(150,110,150,130,1);
  335.    line(160,110,160,130,1);
  336.    line(170,110,170,130,1);
  337.    paint(155,115,2,1);             /* color the widow panes */
  338.    paint(155,125,2,1);
  339.    paint(165,115,2,1);
  340.    paint(165,125,2,1);
  341.    paint(130,110,3,1);            /* color the house  */
  342.  
  343.    line(130,100,130,120,2);       /* lines in the house */
  344.    line(161,75,161,79,2);
  345.    line(155,86,155,97,2);
  346.    line(165,100,165,107,2);
  347.    line(161,72,161,78,2);
  348.    line(142,70,142,93,2);
  349.    line(147,100,147,116,2);
  350.  
  351.    paint(170,90,2,1);             /*  color the door   */
  352.    circle(170,90,2,1,1,1);        /*    knob           */
  353.    paint(170,90,2,1);             /*   fill it         */
  354.    line(114,124,128,124,2);       /*   chimney         */
  355.    line(114,136,136,136,2);
  356.    line(114,124,114,136,2);
  357.    line(128,124,136,136,2);
  358.    paint(120,130,2,2);            /*  fill chimney       */
  359.    line(116,125,116,135,3);       /*  horizontal bricks  */
  360.    line(118,125,118,135,3);
  361.    line(120,125,120,135,3);
  362.    line(122,125,122,135,3);
  363.    line(124,125,124,135,3);
  364.    line(126,125,126,135,3);
  365.    line(128,125,128,135,3);
  366.    line(130,128,130,135,3);
  367.    line(132,132,132,135,3);
  368.    line(134,134,134,135,3);
  369.  
  370.    line(116,130,118,130,3);       /*  vertical bricks */
  371.    line(118,133,120,133,3);
  372.    line(118,127,120,127,3);
  373.    line(120,130,122,130,3);
  374.    line(122,127,124,127,3);
  375.    line(122,133,124,133,3);
  376.    line(124,130,126,130,3);
  377.    line(126,127,128,127,3);
  378.    line(126,133,128,133,3);
  379.  
  380.    line(128,130,130,130,3);
  381.    line(130,133,132,133,3);
  382.  
  383.    line(132,130,134,130,3);
  384.  
  385.    boxfill(140,190,180,210,3);      /*  Tree Trunk   */
  386.    line(168,190,172,188,3);
  387.    line(172,188,180,177,3);
  388.    line(168,210,172,212,3);
  389.    line(172,212,180,223,3);
  390.    line(180,177,180,223,3);         /*  base line of tree  */
  391.    paint(178,185,3,3);              /*  paint the tree     */
  392.    paint(178,215,3,3);
  393.  
  394.    line(174,190,178,183,2);        /*   root lines in tree */
  395.    line(172,210,178,213,2);
  396.    line(174,198,178,190,2);
  397.    line(176,203,178,207,2);
  398.    circle(150,190,3,3,1,3);
  399.    paint(150,189,3,3);
  400.    circle(160,210,3,1,3,3);
  401.    paint(160,211,3,3);
  402.    point(168,205,2);
  403.    point(171,203,2);
  404.    point(168,193,2);
  405.    point(172,195,2);
  406.  
  407.    circle(135,216,10,1,2,1);
  408.    paint(135,216,1,1);
  409.    circle(105,180,9,1,1,1);
  410.    paint(105,180,1,1);
  411.    circle(128,180,9,1,3,1);
  412.    paint(128,180,1,1);
  413.    circle(125,228,5,1,2,1);
  414.    paint(125,228,1,1);
  415.    circle(94,200,10,1,3,1);
  416.    paint(94,200,1,1);
  417.  
  418.    circle(117,200,30,3,5,1);
  419.    paint(116,200,1,1);
  420.    line(110,190,117,200,3);
  421.    line(120,180,128,197,3);
  422.    line(115,200,125,180,3);
  423.  
  424.    circle(74,100,10,1,1,2);       /*   cloud  */
  425.    paint(74,100,2,2);
  426.    circle(62,130,12,1,2,2);
  427.    paint(62,130,2,2);
  428.    circle(72,70,9,1,2,2);
  429.    paint(72,70,2,2);
  430.    circle(32,58,8,1,2,2);
  431.    paint(32,58,2,2);
  432.    circle(20,68,22,1,2,2);
  433.    paint(20,68,2,2);
  434.    circle(35,130,12,1,2,2);
  435.    paint(35,130,2,2);
  436.    circle(21,95,10,1,2,2);
  437.    paint(21,95,2,2);
  438.    circle(33,125,7,1,2,2);
  439.    paint(33,125,2,2);
  440.  
  441.    circle(50,100,41,3,7,2);            /*   cloud  */
  442.    paint(50,100,2,2);               /*  fill it */
  443.  
  444.  
  445.    line(150,194,167,194,1);
  446.    line(142,197,153,197,1);
  447.    line(165,195,174,195,1);
  448.    line(147,200,153,200,1);
  449.    line(150,205,164,205,1);
  450.    line(153,201,164,201,1);
  451.    line(163,202,172,202,1);
  452.  
  453.  
  454.    circle(50,270,15,1,1,3);      /*  moon */
  455.    paint(50,270,03,03);            /*  fill it  */
  456.    point(52,273,1);
  457.    point(43,260,1);
  458.    point(52,262,1);
  459.    point(53,262,1);
  460.    point(52,261,1);
  461.    point(53,273,1);
  462.    point(40,270,1);
  463.    point(60,268,1);
  464.    point(45,281,1);
  465.    point(45,282,1);
  466.    point(44,281,1);
  467.    point(44,272,0);
  468.    point(43,272,0);
  469.    point(43,271,0);
  470.    point(47,265,0);
  471.    point(46,265,0);
  472.    point(46,264,0);
  473.    point(53,275,0);
  474.    point(54,276,0);
  475.  
  476.    delay(3000);
  477. }
  478.  
  479.  
  480. pg7()
  481. {
  482.  
  483.    hollow('F',15,100,3);
  484.    hollow('O',15,124,3);
  485.    hollow('N',15,148,3);
  486.    hollow('T',15,172,3);
  487.    hollow('S',15,196,3);
  488.  
  489.    gliss(100,1000,300);
  490.  
  491.    atsay(6,2,2,0,"Many different Fonts are Possible");
  492.  
  493.    usrfont('T',80,60,2,2,3,0);
  494.    usrfont('H',80,80,2,2,3,0);
  495.    usrfont('I',80,100,2,2,3,0);
  496.    usrfont('N',80,120,2,2,3,0);
  497.    usrfont('L',88,140,1,1,3,0);
  498.    usrfont('E',88,150,1,1,3,0);
  499.    usrfont('T',88,160,1,1,3,0);
  500.    usrfont('T',88,170,1,1,3,0);
  501.    usrfont('E',88,180,1,1,3,0);
  502.    usrfont('R',88,190,1,1,3,0);
  503.    usrfont('S',88,200,1,1,3,0);
  504.  
  505.    usrfont('S',135,146,1,1,3,1);
  506.    usrfont('U',135,152,1,1,3,1);
  507.    usrfont('B',135,158,1,1,3,1);
  508.    usrfont('/',130,164,1,1,3,0);
  509.    usrfont('S',127,174,1,1,3,1);
  510.    usrfont('U',127,180,1,1,3,1);
  511.    usrfont('P',127,186,1,1,3,1);
  512.    usrfont('E',127,192,1,1,3,1);
  513.    usrfont('R',127,198,1,1,3,1);
  514.    usrfont('S',130,209,1,1,2,0);
  515.    usrfont('C',130,219,1,1,2,0);
  516.    usrfont('R',130,229,1,1,2,0);
  517.    usrfont('I',130,239,1,1,2,0);
  518.    usrfont('P',130,249,1,1,2,0);
  519.    usrfont('T',130,259,1,1,2,0);
  520.    usrfont('S',130,269,1,1,2,0);
  521.  
  522.    
  523.  
  524.    usrfont('X',175,65,3,3,1,0);
  525.    usrfont('2',175,97,2,2,1,1);
  526.    usrfont('+',175,105,3,3,1,0);
  527.    usrfont('X',175,134,3,3,1,0);
  528.    usrfont('-',175,160,3,3,1,0);
  529.    usrfont('4',175,185,3,3,1,0);
  530.    usrfont('=',175,210,3,3,1,0);
  531.    usrfont('0',175,230,3,3,1,0);
  532.  
  533. }
  534.  
  535.  
  536.  
  537. pg8()
  538. {
  539.    printf("   Below are a few Unit Conversions\n\n\n\n\n");
  540.    printf("%8.6f inches    = %f cm\n",4.0, INCH_CM(4.0));
  541.    printf("%8.6f cm       = %f inches\n",10.0, CM_INCH(10.0));
  542.    printf("%8.6f degrees  = %f radians\n",90.0, DEG_RAD(90.0));
  543.    printf("%8.6f radians   = %f degrees\n",1.0, RAD_DEG(1.0));
  544.    printf("%8.6f ounces    = %f grams\n",4.0, OZ_GM(4.0));
  545.    printf("%8.6f grams    = %f ounces\n",50.0, GM_OZ(50.0));
  546.    printf("%8.6f gallons  = %f liters\n",10.0, GAL_LT(10.0));
  547.    printf("%8.6f liters   = %f gallons\n",50.0, LT_GAL(50.0));
  548.    printf("%8.6f pounds    = %f kilograms\n",4.0, LB_KG(4.0));
  549.    printf("%8.6f kilogram = %f pounds\n",50.0, KG_LB(50.0));
  550.  
  551. }
  552.  
  553.  
  554.  
  555. pgf()
  556. {
  557.    int start = 9;
  558.  
  559.   
  560.    gothic('U',10,start+0,3);
  561.    gothic('n',10,start+25,3);
  562.    gothic('i',10,start+45,3);
  563.    gothic('c',10,start+65,3);
  564.    gothic('o',10,start+85,3);
  565.    gothic('r',10,start+105,3);
  566.    gothic('n',10,start+125,3);
  567.  
  568.    gothic('S',10,start+155,3);
  569.    gothic('o',10,start+175,3);
  570.    gothic('f',10,start+195,3);
  571.    gothic('t',10,start+215,3);
  572.    gothic('w',10,start+235,3);
  573.    gothic('a',10,start+255,3);
  574.    gothic('r',10,start+275,3);
  575.    gothic('e',10,start+295,3);
  576.  
  577.    atsay(7,5,3,0, "We Hope you have enjoyed seeing");
  578.    atsay(8,5,3,0, "some of the features contained");
  579.    atsay(9,5,3,0, "in the Unicorn library for the");
  580.    atsay(10,5,3,0, "IBM PC medium resolution mode");
  581.    atsay(11,5,3,0, "graphics.");
  582.    atsay(14,5,2,0, "       Developed by");
  583.    atsay(15,5,2,0, "      David A. Miller");
  584.  
  585.    gliss(3000, 200, 100);
  586.  
  587.    atsay(24,4,2,0, " Press any key to return to Dos");
  588. }
  589.  
  590.  
  591.  
  592.  
  593. atom()
  594. {
  595.   ellipser(100,160,0,50,25,2);
  596.   ellipser(100,160,0,25,50,2);
  597.   ellipser(100,160,48,50,25,1);
  598.   ellipser(100,160,48,25,50,1);
  599.                
  600.   circle(100,160,70,1,1,1);
  601.   circle(100,160,66,1,1,1);
  602.   paint(100,228,2,1);
  603.   circle(100,160,4,1,1,3);
  604.   paint(100,160,3,3);
  605. }
  606.  
  607.  
  608. cntue()
  609. {
  610.    atsay(15,1,2,0, "Press any");
  611.    atsay(16,2,2,0, "Key to");
  612.    atsay(17,1,2,0, "continue");
  613. }
  614.  
  615. unicorn()
  616. {
  617.    line(66,100,107,156, 3);      /*   horn  */
  618.    line(66,100,113,148, 3);
  619.  
  620.  
  621.    line(157,170,158,154, 3);
  622.    line(158,154,172,138, 3);
  623.    line(172,138,173,125, 3);
  624.    line(173,125,166,115, 3);
  625.    line(166,115,151,117, 3);
  626.    line(151,117,130,138, 3);
  627.    line(130,138,120,140, 3);
  628.    line(120,140,98,168, 3);     /* this line ends at the ear  */
  629.    line(98,168,85,165,  3);
  630.    line(85,165,89,172, 3);
  631.    line(89,172,97,180, 3);
  632.    line(97,180,121,224, 3);     /* outline after ear      */
  633.    line(121,224,156,255, 3);
  634.    line(156,255,198,266, 3);    /*  very bottom line  */
  635.  
  636.    line(157,170,170,180, 3);     /* part to left going down  */
  637.    line(170,180,198,180, 3);     /* very bottom line */
  638.  
  639.    line(198,180,198,266,3);      /*   line across base of head  */
  640.    paint(188,182,3,3);           /*   fill in the head!!  */
  641.    paint(111,148, 3,3);        /*   fill in the horn    */
  642.    line(148,185,157,170, 2);      /* head starting at bottom  */
  643.  
  644.    line(152,130,140,142, 2);     /* in head near mouth    */
  645.    line(140,142,133,156, 2);
  646.  
  647.    line(103,167,123,173,2);     /* between ear and eye   */
  648.  
  649.    line(173,125,160,138,2);       /*  mouth   */
  650.  
  651.    line(167,145,181,151,3);       /*  goatee   */
  652.    line(181,151,175,141,3);
  653.    line(175,141,183,139,3);
  654.    line(183,139,173,133,3);
  655.    paint(172,141,3,3);             /*  color the goatee  */
  656.  
  657.    line(102,149,107,142, 2);       /* lines across the horn   */
  658.    line(97,140, 100,135, 2);
  659.    line(91,134,94,130, 2);
  660.    line(86,127,88,122, 2);
  661.    line(81,121,83,119, 2);
  662.    line(76,113,77,111, 2);
  663.  
  664.    line(98,180,140,182,2);        /*  mane     */
  665.    line(106,160,118,168,2);
  666.    line(140,182,149,198,2);
  667.    line(130,205,170,208,2);
  668.    line(170,208,180,220,2);
  669.    line(154,232,190,235,2);
  670.    line(190,235,194,245,2);
  671.  
  672.    ellipser(122,158,42,7,3,2);
  673.    paint(122,158,2,2);
  674.    ellipser(156,123,72,4,2,2);
  675.    paint(156,123,2,2);
  676.  
  677.    circle(123,157,2,1,1,1);
  678.    paint(123,157,1,1);
  679.    point(123,157,3);
  680. }
  681.  
  682. greenslv()
  683. {
  684.    playibm(6,3,400);
  685.  
  686. /* 1 */
  687.    playibm(9,3,800);
  688.    playibm(11,3,400);
  689.  
  690. /* 2 */
  691.    playibm(1,4,500);
  692.    playibm(3,4,300);
  693.    playibm(1,4,400);
  694.  
  695. /* 3 */
  696.    playibm(11,3,800);
  697.    playibm(8,3,400);
  698.  
  699. /* 4 */
  700.    playibm(4,3,500);
  701.    playibm(6,3,300);
  702.    playibm(8,3,400);
  703.  
  704. /* 5 */
  705.    playibm(9,3,800);
  706.    playibm(6,3,400);
  707.  
  708. /* 6 */
  709.    playibm(6,3,500);
  710.    playibm(5,3,300);
  711.    playibm(6,3,400);
  712.  
  713. /* 7 */
  714.    playibm(8,3,800);
  715.    playibm(5,3,400);
  716.  
  717. /* 8 */
  718.    playibm(1,3,800);
  719.    playibm(6,3,400);
  720.  
  721. /* 9 */
  722.    playibm(9,3,800);
  723.    playibm(11,3,400);
  724.  
  725. /* 10 */
  726.    playibm(1,4,500);
  727.    playibm(3,4,300);
  728.    playibm(1,4,400);
  729.  
  730. /* 11 */
  731.    playibm(11,3,800);
  732.    playibm(8,3,400);
  733.  
  734. /* 12 */
  735.    playibm(4,3,500);
  736.    playibm(6,3,300);
  737.    playibm(8,3,400);
  738.  
  739. /* 13 */
  740.    playibm(9,3,500);
  741.    playibm(8,3,300);
  742.    playibm(6,3,400);
  743.  
  744. /* 14 */
  745.    playibm(5,3,400);
  746.    playibm(3,3,400);
  747.    playibm(5,3,400);
  748.  
  749. /* 15 */
  750.    playibm(6,3,1200);
  751.    playibm(1,1,1);
  752. /* 16 */
  753.    playibm(6,3,1200);
  754.  
  755. /* 17 */
  756.    playibm(4,4,800);
  757.    playibm(1,1,1);
  758.  
  759. /* 18 */
  760.    playibm(4,4,400);
  761.    playibm(3,4,400);
  762.    playibm(1,4,400);
  763.  
  764. /* 19 */
  765.    playibm(11,3,800);
  766.    playibm(8,3,400);
  767.  
  768. /* 20 */
  769.    playibm(4,3,500);
  770.    playibm(6,3,300);
  771.    playibm(8,3,400);
  772.  
  773. /* 21 */
  774.    playibm(9,3,800);
  775.    playibm(6,3,400);
  776.  
  777. /* 22 */
  778.    playibm(6,3,400);
  779.    playibm(5,3,400);
  780.    playibm(6,3,400);
  781.  
  782. /* 23 */
  783.    playibm(8,3,800);
  784.    playibm(5,3,400);
  785.  
  786. /* 24 */
  787.    playibm(1,3,1600);
  788.    playibm(1,1,1);
  789.  
  790. /* 25 */
  791.    playibm(4,4,1600);
  792.    playibm(1,1,1);
  793.  
  794. /* 26 */
  795.    playibm(4,4,400);
  796.    playibm(3,4,400);
  797.    playibm(1,4,400);
  798.  
  799. /* 27 */
  800.    playibm(11,3,800);
  801.    playibm(8,3,400);
  802.    playibm(1,1,1);
  803.  
  804. /* 28 */
  805.    playibm(4,3,500);
  806.    playibm(6,3,300);
  807.    playibm(8,3,400);
  808.  
  809. /* 29 */
  810.    playibm(9,3,500);
  811.    playibm(8,3,300);
  812.    playibm(6,3,400);
  813.  
  814. /* 30 */
  815.    playibm(5,3,400);
  816.    playibm(3,3,400);
  817.    playibm(5,3,400);
  818.  
  819. /* 31 */
  820.    playibm(6,3,1600);
  821.    playibm(1,1,1);
  822.  
  823. /* 32 */
  824.    playibm(6,3,1200);
  825. }
  826.  
  827. victory()
  828. {
  829.   playibm(7,3,320);
  830.   playibm(1,4,320);
  831.   playibm(4,4,320);
  832.   playibm(7,4,480);
  833.   playibm(7,4,160);
  834.   playibm(7,4,320);
  835.   playibm(4,4,480);
  836.   playibm(4,4,160);
  837.   playibm(4,4,320);
  838.   playibm(12,3,320);
  839.   playibm(4,4,320);
  840.   playibm(12,3,320);
  841.   playibm(7,3,960);
  842. }
  843.